<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>login_result.jsp</title>

<script>
window.onload = function(){
	document.getElementById("btnOk").onclick = function(){
		location.href = 'index2.jsp?inc_center=./jsp/login.jsp';		
	}
}
</script>

</head>
<body>
<jsp:useBean id="bean" class="member.Login" scope="page"/>
<!-- 폼태그에 있었던 모든 입력항목이 클래스 Login에 모두 전달됨. -->
<jsp:setProperty property="*" name="bean"/>

<%
if(bean.login()){
	out.print("다시 찾아주셔서 감사드립니다.");
	out.print(bean.getMemberid() + " 님");
	session.setAttribute("mid", bean.getMemberid());
}else{
	out.print("아이디를 다시 확인바랍니다.");
}
%>

<li>MID : <%=bean.getMemberid() %>
<li>PWD : <%=bean.getPwd() %>

<p/>
<input type="button" value="확인" id="btnOk">
</body>
</html>